<!--Select relation type*: <select name="relation_type" id="relation_type">
  <option value="0">Just a related article</option>
  <option value="2">My article is a sequel of this article</option>
  <option value="1">This article is a sequel of my article</option>
  <option value="3">My article expresses a very different view of the same event</option>
  <option value="4">My article explains the background of this event</option>
</select>-->
<div id="search_articles_block">
<input name="search_articles" id="search_articles" value="<?php echo $criteria; ?>"/>
<input type=button value="Search" onclick="search_articles_button_pressed();"/>
</div>
<div id="search_articles_results">
<?php if($criteria) { ?>
Search results for <?php echo $criteria; ?>:
<?php } else { ?>
<?php } ?>
<table><tr><td>
<?php
$counter = 0;
foreach($articles as $article)
{
    echo OxArticle::from_id($article->idarticle)->preview();
	echo '<a href="javascript:add_new_related_article('.$article->idarticle.')">Add this article</a>';
	echo '</td></tr><tr><td>';
} 
?>
</td></tr></table>
</div>
<input type=button id="geostamps_results_previous" value="Previous results" onclick="search_articles(<?php echo  "'".$criteria."', false, ". ($offset-3); ?>);" <?php if($offset < 3) echo 'disabled="disabled"'; ?>/>
<input type=button id="geostamps_results_next" value="Next results" onclick="search_articles(<?php echo  "'".$criteria."', false, ". ($offset+3); ?>);" <?php if(count($articles) < 3) echo 'disabled="disabled"'; ?>/>
<input type=button value="Cancel" onclick="cancel_popup_dlg();"/>
